import Vue from 'vue'
import Vuex from 'vuex'
import songList from './modules/songs-list'
import player from '@/views/player/store/player'
Vue.use(Vuex)
//动态引入其他模块
const files=require.context('./modules',true,/\.js/)
const modules=files.keys().reduce((sum,item)=>{
  let key=item.replace('./','').replace('.js','')
  sum[key]=files(item).default
  return sum
},{})
// 公用的
export default new Vuex.Store({
  state: {
    
  },
  mutations: {
    
  },
  actions: {
    
  },
  modules:{
    ...modules,
    player,
    songList
  }
})
